package com.htgd.gardenexpo.controller;


import com.htgd.gardenexpo.entity.CommonResult;
import com.htgd.gardenexpo.entity.GeConDailyDataDeck;
import com.htgd.gardenexpo.entity.GeConDeviceStatus;
import com.htgd.gardenexpo.service.IGeConDeviceStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 设备当前状态表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-04-23
 */
@RestController
@RequestMapping("/api/deviceStatus")
@Api(tags = "设备当前状态")
@Slf4j
public class GeConDeviceStatusController {

    @Autowired
    private IGeConDeviceStatusService geConDeviceStatusService;

    @GetMapping(value = "/getStatus")
    @ApiOperation("获取设备当前状态")
    public CommonResult getStatus(@RequestParam(value = "deviceId" )String deviceId) {
        log.info("获取设备当前状态：{}",deviceId);
        return geConDeviceStatusService.getStatus(deviceId);
    }

}
